package com.jie.controller;


import com.jie.entity.AddressDO;
import com.jie.entity.UserDO;
import com.jie.enums.BizCodeEnum;
import com.jie.mapper.UserMapper;
import com.jie.service.AddressService;
import com.jie.utils.JsonData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 电商-公司收发货地址表 前端控制器
 * </p>
 *
 * @author 杰
 * @since 2023-08-29
 */
@Api(tags="收获地址模块")
@RestController
@RequestMapping("/api/adder/v1")
public class AddressController {

    @Autowired
    private AddressService addressService;
    @ApiOperation("根据地址id查找地址")
    @GetMapping("/find/{address_id}")
    public JsonData detai(@ApiParam(value = "地址id",readOnly = true) @PathVariable("address_id") int id){
        AddressDO addressDO=addressService.detail(id);
        return JsonData.buildSuccess(addressDO);
    }

}

